package com.fwmagic.rpc.service.pojo;

import java.io.Serializable;
import java.util.Arrays;

/**
 * 需要序列化，以便于传输
 */
public class RpcRequest implements Serializable {

    private static final long serialVersionUID = -1471851100655053034L;

    //方法名称
    private String methodName;

    //参数类型
    private Class[] paramTypes;

    //方法的参数值
    private Object[] args4Method;

    public RpcRequest() {
    }

    public RpcRequest(String methodName, Class[] paramTypes, Object[] args4Method) {
        this.methodName = methodName;
        this.paramTypes = paramTypes;
        this.args4Method = args4Method;
    }

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public Class[] getParamTypes() {
        return paramTypes;
    }

    public void setParamTypes(Class[] paramTypes) {
        this.paramTypes = paramTypes;
    }

    public Object[] getArgs4Method() {
        return args4Method;
    }

    public void setArgs4Method(Object[] args4Method) {
        this.args4Method = args4Method;
    }

    @Override
    public String toString() {
        return "RpcRequest{" +
                ", methodName='" + methodName + '\'' +
                ", paramTypes=" + Arrays.toString(paramTypes) +
                ", args4Method=" + Arrays.toString(args4Method) +
                '}';
    }
}
